﻿using UnityEngine;
using System.Collections;

public class JunctionController : MonoBehaviour
{
	public GameObject m_leftJunction;
	public GameObject m_rightJunction;

	void Start ()
	{
	}
	
	void Update ()
	{
		if (Input.GetMouseButtonDown(0))
		{
			Vector2 pos = Input.mousePosition;
			if (pos.x < Screen.width / 2f)
			{
				m_leftJunction.SetActive(true);
				m_rightJunction.SetActive(false);
			}
			else
			{
				m_leftJunction.SetActive(false);
				m_rightJunction.SetActive(true);
			}
		}
	}
}
